Text & Font Styles

Font Styles

The font styles refer to the shape and presentation of the letters. The font-family: property allows you to define the typeface you want to use. When selecting a font-family for a web page, you should select only those that are most common among all browsers. If one of your visitors does not have the font-family you specified, their browser will display its default font.

The font-weight: style property allows you to define how strong, or bold, a font is. The font-weight property is different from the strong tag because it allows you to define a specific degree of bold.

The font-size: style property allows you to define the size of the font. There are a variety of units in which you can define font-size, but a few are listed here.

Text Styles

The text properties refer to the placement of the text on the page and additions to the text such as underlines and shadows. The text-decoration: property will allow you to place a line above, under or through the text, or it can remove an underline from text.

The text-align: property will allow you to align text to the left, right, center, or justify. The justify property is generally only used with paragraphs because it will align the text on both the left and right.